package latisi.managers
{
   import latisi.models.Article;
   import latisi.models.Tblock;
   import mx.controls.Alert;
   import org.restfulx.Rx;

   public class AnnotateManager
   {

     [Bindable]
     public var article:Article;

     [Bindable]
     public var hoveredTblock:Tblock;

     [Bindable]
     public var selectedTblockSprites:Array;

     public function cacheUpdate(article:Article):void {
       this.article = article;
       trace("in cacheUpdate");
     }

     public function loadArticle(article:Article):void {
       if (article) {
	 Rx.models.reset(article);
	 Rx.models.show(article) as Article;
       } else {
	 this.article = new Article();
       }
       trace("in loadArticle");
     }

     public function updateHover(hover:Tblock):void {
       this.hoveredTblock = hover;
     }

     public function updateSelected(sel:Array):void {
       this.selectedTblockSprites = sel;
     }

   }
}